/* 连接配置区域 */
.connection-config {
    background-color: #fff;
    border-bottom: 1px solid #e6e6e6;
    flex-shrink: 0;
}

.config-header {
    padding: 12px 15px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #e6e6e6;
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.config-header i {
    margin-right: 8px;
    color: #666;
}

.config-header span {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.toggle-config {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.toggle-config.expanded {
    transform: rotate(180deg);
}

.config-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #fafafa;
}

.config-content.expanded {
    max-height: 300px;
}

.connection-form {
    padding: 15px;
}

.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: flex-end;
}

.form-group {
    flex: 1;
}

.form-group.small {
    flex: 0 0 80px;
}

.form-group.large {
    flex: 2;
}

.form-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.form-input {
    width: 100%;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 13px;
    transition: border-color 0.3s;
}

.form-input:focus {
    border-color: #16baaa;
    outline: none;
}

.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

/* 状态信息 */
.status-info {
    margin: 8px 12px;
    padding: 8px 12px;
    background-color: #f0f9ff;
    border-left: 4px solid #1e90ff;
    border-radius: 2px;
    font-size: 12px;
    color: #0369a1;
    display: flex;
    align-items: center;
}

.status-info i {
    margin-right: 6px;
}

.error-info {
    margin: 8px 12px;
    padding: 8px 12px;
    background-color: #fff5f5;
    border-left: 4px solid #f56565;
    border-radius: 2px;
    font-size: 12px;
    color: #e53e3e;
    display: flex;
    align-items: center;
}

.error-info i {
    margin-right: 6px;
}

/* 目录树区域 */
.tree-wrapper {
    flex: 1;
    overflow: auto;
    padding: 12px;
    position: relative;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    z-index: 10;
}

.loading i {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
}

/* Layui树形组件样式覆盖 */
#directoryTree {
    background: transparent;
}

.layui-tree-entry {
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.layui-tree-entry:hover {
    background-color: #f5f5f5;
}

.layui-tree-entry.layui-tree-entryd {
    background-color: #e6f7ff;
}

.layui-tree-txt {
    font-size: 13px;
    color: #333;
}

.layui-tree-iconClick {
    margin-right: 4px;
}

.layui-icon-file,
.layui-icon-addition {
    color: #666;
}

/* 自定义按钮样式 */
.btn-small {
    height: 28px;
    line-height: 28px;
    padding: 0 12px;
    font-size: 12px;
    border-radius: 2px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-small:hover {
    border-color: #16baaa;
    color: #16baaa;
}

.btn-primary {
    background: #16baaa;
    border-color: #16baaa;
    color: #fff;
}

.btn-primary:hover {
    background: #13a39a;
    border-color: #13a39a;
}

.btn-success {
    background: #52c41a;
    border-color: #52c41a;
    color: #fff;
}

.btn-success:hover {
    background: #389e0d;
    border-color: #389e0d;
}